<template>
	<view>
		<view class="seo">
			<input class="seos" type="text" value="" placeholder="输入成绩状态/班级查询"/>
			<image class="stb" src="../../../static/seo.png" mode=""></image>
		</view>
		<view class="list" v-for="(itam,index) in neirong" :key="index" @click="tz(itam.id,itam.taskedId,itam.schedule)">
			<view class="list_z" style="width: 450upx;"><text>{{itam.depa}}</text><text class="m-l2">{{itam.name}}</text> </view>
			<view class="list_z" style="text-align: end;width: 100upx;">{{itam.schedule}}</view>
			
			<image class="qiehuan" src="../../../static/fan.png" mode=""></image>
		</view>
	</view>
 </template>
<script>
export default {
    data(){
        return{
            neirong:[],
			id:[]
        }
    },
	onLoad(option) {
		this.id = option.id
		console.log(this.id)
	},
	onShow() {
		let that = this
		let params = {
		  "pageNo":1,
		  "pageSize":99999,
		  "taskedId":that.id
		}
		that.pyReq(that.$http.getStuListByTasked,params,function(res){
				that.neirong = res.result
		});
		// let headers={
		// 	 'content-type': 'application/x-www-form-urlencoded',
		// 	 'token': uni.getStorageSync('token')
		// }
		//  uni.request({
		// 	  url: that.$http.getStuListByTasked,
		// 	  method: 'POST',
		// 	  data: params,
		// 	  header: headers,
		// 	  success: (res)=>{
		// 		  console.log(res)
		// 		  that.neirong = res.data.result
		// 	  },
		// 	  fail: (err)=>{
		// 		  console.log(err)
		// 	  }
		// })  
	},
    methods:{
		//导航
		tz(id,ids,jindu){
			let that = this;
		  if(jindu=='未读'||jindu=='未提交'){
			that.toast('该生任务未提交');
			return;
		  }
			uni.navigateTo({
				url:'./wancheng?id='+id+'&rwid='+ids
			})
		}
    }
}
</script>
<style>
	.list{
		display: flex;
		justify-content:space-between;
		border-bottom: 1px solid #666666;
	}
	.list_z{
		margin-left: 40upx;
		margin-top: 30upx;
		margin-bottom: 20upx;
	}
	.qiehuan{
		width: 14upx;
		height: 26upx;
		margin-right: 30upx;
		margin-top: 40upx;
	}
	.seo{
		position: relative;
		background: #B31610;
		height: 100upx;
		padding-top: 40upx;
	}
	.seos{
		width: 663upx;
		height: 60upx;
		border-radius: 10upx;
		background: #FFFFFF;
		margin: 0 auto;
		font-size: 24upx;
		padding-left: 47upx;
		box-sizing: border-box;
	}
	.stb{
		position: absolute;
		right: 74upx;
		top: 56upx;
		width: 28upx;
		height: 30upx;
	}
</style>